package com.itheima.a03threadcase3;

import java.util.concurrent.Callable;

/**
 * 泛型就是我要返回的结果的类型
 */
public class MyCallable implements Callable<Integer> {
    /**
     *
     */
    @Override
    public Integer call() throws Exception {
        //1~100的和
        int sum = 0 ;
        for (int i = 1; i <= 100; i++) {
            sum += i ;
        }
        return sum;
    }
}
